<!doctype html>
<html>
<head>
    <meta charset="UTF-8">
    <title>blog后台管理</title>
    <link rel="stylesheet" type="text/css" href="__CSS__/common.css"/>
    <link rel="stylesheet" type="text/css" href="__CSS__/main.css"/>
    <script type="text/javascript" src="js/libs/modernizr.min.js"></script>
</head>
<body>
<include file="Public/top" />
<div class="container clearfix">
<include file="Public/left" />
    <div class="main-wrap">

        <div class="crumb-wrap">
            <div class="crumb-list"><i class="icon-font"></i><a href="{:U('index/index')}">首页</a><span class="crumb-step">&gt;</span><span class="crumb-name">文章管理</span></div>
        </div>
        <div class="result-wrap">
            <form name="myform" id="myform" method="post">
                <div class="result-title">
                    <div class="result-list">
                        <a href="{:U('admin/insert/index')}"><i class="icon-font"></i>新增文章</a>
                        <a id="batchDel" href=""><i class="icon-font"></i>批量删除</a>
                    </div>
                </div>
                <div class="result-content">
 <table class="result-tab" width="100%">
                        <tr>
                            <th class="tc" width="5%"><input class="all" type="checkbox"></th>
                            <th>ID</th>
                            <th>文章标题</th>
                            <th>文章作者</th>
                            <th>文章类型</th>
                            <th width="8%">点击率</th>
                            <th width="15%">文章创建时间</th>
                            <th width="8%">操作</th>
                        </tr>
                        <if >

                <empty name="article">
                <td align="center" colspan="8">暂无数据</td>
            </table>
            </div>
                    <else /> 
                        <foreach name="article" item="article">
                        <tr>
                            <td class="tc"><input name="id[]" value="{$article.article_id}" type="checkbox"></td>
                            <td align="center">{$article.article_id}</td>
                            <td align="center">{$article.article_title}</td>
                            <if condition="$article[author_id] eq 1"> 
                                <td align="center">admin</td>
                                <else />
                                <td align="center">{$article.author_id}</td>
                                </if>
                            <if condition="$article[article_type] eq 0 ">
                            <td align="center">博客文章</td>
                                <else />
                            <td align="center">博客日记</td>
                            </if>
                            <td align="center">{$article.article_click}</td>
                            <td align="center">{$article.article_create_time}</td>
                            <td>
                                <a class="link-update" href="{:U(updata, array(id=>$article[article_id]))}">修改</a>
                                <a class="link-del" onclick="return confirm('你确定要删除该文章吗？')" href="{:U(del, array(id=>$article[article_id]))}">删除</a>
                            </td>
                        </tr>
                        </foreach>
                    </table>
                    <div class="list-page">{$page}</div>
                </div>
                </empty> 
    </form>
        </div>
    </div>
    <!--/main-->
</div>
</body>
</html>